<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
    <head>
        <title>Title</title>
    </head>
    <body>
        <jsp:include page="/emp/navigation.jsp"></jsp:include>

        <h1>员工列表</h1>
        <hr/>

        <table border="1" width="50%">
            <tr>
                <th>序号</th>
                <th>姓名</th>
                <th>工资</th>
                <th>操作</th>
            </tr>


            <c:forEach items="${emps}" var="emp" varStatus="s">
                <tr>
                    <td>${s.count}</td>
                    <td>
                        <a href="${pageContext.request.contextPath}/load.emp?id=${emp.id}">${emp.name}</a>
                    </td>
                    <td>${emp.salary}</td>
                    <td>
                        <a href="${pageContext.request.contextPath}/remove.emp?id=${emp.id}" onclick="return confirm('确认是否删除？');">删除</a>
                    </td>
                </tr>
            </c:forEach>

        </table>
    </body>
</html>
